<?php
declare (strict_types=1);

namespace app\data\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Jobposition extends BaseModel
{
    protected $table = 'ctmon_jobposition';
    protected $pk = 'position_id';
    protected $schema = [
        'position_id' => 'int',
        'name' => 'varchar',
        'number' => 'int',
        'content' => 'text',
        'content2' => 'text',
        'department_id' => 'int',
        'en_time' => 'timestamp',
        'sort_order' => 'int',
        'join_time' => 'varchar',
        'education' => 'varchar',
        'address' => 'varchar',
        'link' => 'varchar',
        'ver' => 'bigint',
        'create_time' => 'int',
        'update_time' => 'int',
        'delete_time' => 'int',
    ];

    /**
     * 职位部门
     * @return \think\model\relation\HasOne
     */
    public function department()
    {
        return $this->hasOne(Jobdepartment::class, 'department_id', 'department_id');
    }
}
